package com.yt.system.service.impl;

import com.yt.system.dao.GroupMapper;
import com.yt.system.domain.GroupTable;
import com.yt.system.domain.ObjectiveKeyresults;
import com.yt.system.domain.User;
import com.yt.system.service.GroupService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * ShiYuNan
 */
@Service
public class GroupServiceImpl implements GroupService {
    @Autowired
    GroupMapper groupMapper;
    //1.查所有组名
    @Override
    public List<GroupTable> selectGName(){
        return groupMapper.selectGName();
    }
    //2.根据小组id查询uid，uname
    @Override
    public List<User> selectGroup(int gid){
        return groupMapper.selectGroup(gid);
    }

    //根据小组id查询okr
    @Override
    public List<ObjectiveKeyresults> selectOkr(int gid){
        return groupMapper.selectOkr(gid);
    }

    //根据小组id查成员okr
    @Override
    public List<ObjectiveKeyresults> selectOkrByGid(int gid){
        return groupMapper.selectOkrBygid(gid);
    }


}
